package com.ruoyi.web.controller.vantController.shopController;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.zhuangxiumain.shopMain.ProductInfo;
import com.ruoyi.system.service.zhaungxiuservice.shopService.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/api/booking")
public class ApiSuperGroupController extends BaseController {

    @Autowired
    private GroupService groupService;


    @GetMapping(value = "/GroupfindAllList")
    public List<ProductInfo> GroupfindAllList(ProductInfo productInfo){
        List<ProductInfo> list = groupService.GroupfindAllList(productInfo);
        return list;
    }

    @GetMapping(value = "/GroupFindAddress/{address}")
    public List<ProductInfo> GroupFindAddress(@PathVariable("address") String address){
        List<ProductInfo> listAddress = groupService.GroupFindAddress(address);
        return listAddress;
    }


    @GetMapping(value = "/getInfo/{productId}")
    public AjaxResult GroupfindAllById(@PathVariable("productId") Integer productId)
    {
        return AjaxResult.success(groupService.GroupfindAllById(productId));
    }



}
